
package system.base;

import framework.core.*;

/*
	Author    :Wing
	CreateTime:2008-02-04 10:56:45
*/
public class FunctionSearchEvent extends SearchEvent
{

	private String m_id = "" ; // all

	private String m_menu_id = "" ; // all

	private String m_code = "" ; // all

	private String m_name = "" ; // all

	private String m_url = "" ; // all

	private int m_display_order = Value.NULL_INT ; // all
		

public FunctionSearchEvent() 
{
	super();
	
	setOrderField(Function.ID);
		
}



	public String getId()
	{
		return m_id ;
	}
	public void setId(String v)
	{
		m_id = v;
	}

	public String getMenuId()
	{
		return m_menu_id ;
	}
	public void setMenuId(String v)
	{
		m_menu_id = v;
	}

	public String getCode()
	{
		return m_code ;
	}
	public void setCode(String v)
	{
		m_code = v;
	}

	public String getName()
	{
		return m_name ;
	}
	public void setName(String v)
	{
		m_name = v;
	}

	public String getUrl()
	{
		return m_url ;
	}
	public void setUrl(String v)
	{
		m_url = v;
	}

	public int getDisplayOrder()
	{
		return m_display_order ;
	}
	public void setDisplayOrder(int v)
	{
		m_display_order = v;
	}
		



	public String viewId() throws Exception
	{
		return Value.view(getId());
	}

	public String viewMenuId() throws Exception
	{
		return Value.view(getMenuId());
	}

	public String viewCode() throws Exception
	{
		return Value.view(getCode());
	}

	public String viewName() throws Exception
	{
		return Value.view(getName());
	}

	public String viewUrl() throws Exception
	{
		return Value.view(getUrl());
	}

	public String viewDisplayOrder() throws Exception
	{
		return Value.view(getDisplayOrder());
	}


	public Conditions toConditions() throws Exception
	{
		Conditions c = super.toConditions();

	c.add(getCondition(Function.ID,getId()));

	c.add(getCondition(Function.MENU_ID,getMenuId()));

	c.add(getCondition(Function.CODE,getCode()));

	c.add(getCondition(Function.NAME,getName()));

	c.add(getCondition(Function.URL,getUrl()));

	c.add(getCondition(Function.DISPLAY_ORDER,getDisplayOrder()));
		

			
		return c ;
	}
	
//add by Wing start

//add by Wing end
}
